<div id="ContentGroup">
    <div class="count-header">
        <a>首页轮播添加</a>
    </div>
    <div class="count-content-group">
        <div class="count-content">
            <form  id="SYLB_Insert" data-role="form" data-event="finish" data-type="post" data-url="<{'SYLB_Insert_Action'|U}>">
                <input type="hidden" id="SYLB_BH_ORA"  name="SYLB_BH_ORA" value="<{$Model->SYLB_BH|security_encript}>" />
                <div class="count-content-title">首页轮播</div>
                <div class="count-content-type"><{*此处添加全局注释*}></div>
                <div class="form-list-item">
                    <label class="form-list-item-label"><span style="color: red">*</span>标题</label>
                    <input type="text" id="SYLB_BT" name="SYLB_BT" value="<{$Model->SYLB_BT }>"/>
                    <p class="form-list-item-tip"></p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label"><span style="color: red">*</span>超链接</label>
                    <input type="text" id="SYLB_CLJ" name="SYLB_CLJ" value="<{$Model->SYLB_CLJ }>"/>
                    <p class="form-list-item-tip"></p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label">简介</label>
                    <textarea id="SYLB_JJ" name="SYLB_JJ"><{$Model->SYLB_JJ }></textarea>
                    <p class="form-list-item-tip">300字以内的纯文字介绍</p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label">图片</label>
                    <input type="text" id="SYLB_TP"  name="SYLB_TP"  value="<{$Model->SYLB_TP }>" />
                    <span id="SYLB_TPImage" class="button" >选择图片</span>
                    <p class="form-list-item-tip">本地上传765*300的图片，或输入远程图片url</p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label"><span style="color: red">*</span>状态</label>
                    <{'SYLB_ZT'|html_dropdownlist:["显示" , "隐藏"]:$Model->SYLB_ZT}>
                    <p class="form-list-item-tip"></p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label"><span style="color: red">*</span>显示顺序</label>
                    <{'SYLB_XSSX'|html_dropdownlist:["1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "10" , "11" , "12" , "13" , "14" , "15" , "16" , "17" , "18" , "19" , "20"]:$Model->SYLB_XSSX}>
                    <p class="form-list-item-tip">默认信息将按从小到大顺序排列</p>
                </div>
            </form>     
            <div class="form-operation">
                <span class="button" id="SYLB_Insert-Submit">提交</span>
                <span class="button" data-role="back">返回</span>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        $("#ContentGroup").formset(0);//开启页面标签页
        //$("#SYLB_Insert").vtip();//开启鼠标提示.
        
        //客户端验证脚本
        $("#SYLB_Insert").validate({
            rules:{
                "SYLB_BH":{
                    "maxbytelength":50 ,
                    "required":true 
                }, 
                "SYLB_BT":{
                    "maxbytelength":100 ,
                    "required":true 
                }, 
                "SYLB_CLJ":{
                    "maxbytelength":500 ,
                    "required":true 
                }, 
                "SYLB_JJ":{
                    "maxbytelength":1000 
                }, 
                "SYLB_TP":{
                    "maxbytelength":500 
                }, 
                "SYLB_ZT":{
                    "maxbytelength":50 ,
                    "required":true 
                }, 
                "SYLB_XSSX":{
                    "required":true 
                }, 
                "example":{} //可继续追加jquery validate客户端验证条件
            },
            "errorClass": "form-list-item-warn",
            //errorPlacement: function (error, element) {element.attr("data-tips", error.text());},//关闭默认提示，使用鼠标提示框时使用
            submitHandler: function () {
                $("#SYLB_Insert").trigger("finish");
            }
        });
    
        $("#SYLB_TPImage").click(function(){
            $.imageUpload("SYLB_TP", 765, 300,$("#SYLB_TP").val(), function(data){
                $("#SYLB_TP").val(data);
            });
        });
        $("#SYLB_JJ").attr("data-tip","300字以内的纯文字介绍");
        $("#SYLB_TP").attr("data-tip","本地上传765*300的图片，或输入远程图片url");
        $("#SYLB_XSSX").attr("data-tip","默认信息将按从小到大顺序排列");
        $("#SYLB_Insert-Submit").click(function () {
            $("#SYLB_Insert").submit();
        });
    });
</script>
